Setting up local NuGet feed
To reference NuGet-packages it’s necessary to publish them into NuGet feed. One of possible NuGet feeds is a local NuGet repository. To create a local repository, you need to do following steps:
-
Create LocalPackages directory in repository of your project
-
Copy NuGet packages to the LocalPackages folder
-
Create NuGet.Config file in root directory of your project
-
Put following value in Nuget.Config file:
<?xml version="1.0" encoding="utf-8"?><configuration>
<packageSources>
<add key="localPackages" value="LocalPackages" />
</packageSources>
</configuration>
-
Run Visual Studio
-
Open the project in which you need to reference NuGet-package
-
Perform right mouse click on project in solution explorer and click ‘Manage NuGet packages’ in context menu
-
Choose LocalPackages in Package source

-
Search for necessary package and install.
Note: You can find more information about private NuGet feeds on https://docs.microsoft.com/en-us/nuget/hosting-packages/overview
